<include file="Public:header" />
    <div class="wrap_left">
        <div class="rbox5">
            <div class="rbox5_top"></div>
            <div class="rbox5_center">
            	<h2>视频标题：{$info.title}</h2>
                {:chvideo($info['file'])}
            </div>
            <div class="rbox5_bottom"></div>            
        </div><!--视频播放-->

        <div class="rbox5">
            <div class="rbox5_top"></div>
            <div class="rbox5_center">
                <h2>我要推荐</h2>
                <div id="postTemp"></div>
				<div id="ajaxContent"></div>
                <div class="sub_form">
                        <div>
                             <div class="productsearchform">
                            	{:Sys::classSelect('视频', 'name="tid" id="tid" class="box" style="display:none;width:224px; height:22px;"')} 
								<script language="javascript">
                                makeSelectBox('tid','__PUBLIC__/Plugin/selectbox/');
                                </script>
                             </div>
                        </div>
                        <div>
                            <input type="text" name="title" id="title" class="long" />
                          <label class="required">视频标题（必须）</label>
                        </div>
                        <div>
                        	<input type="text" name="url" id="url" class="long" />
                            <label class="required">链接地址（必须）</label>
                        </div>
                        <div>
                      		<table><tr><td>
                            <img src="__APP__/common/verify" alt="点击刷新验证码" id="verifyImg" class="code" onclick="this.src+='?' + Math.random();" /></td><td>
                            <input type="text" name="verify" id="verify" class="short" maxlength="4" />
                            <label class="required">验证码（必须）</label></td></tr></table>
                        </div>
                        <div>
                        	<textarea name="description" id="description"></textarea>
                            <label>视频介绍</label>
                        </div>

                        <div>
                            <input type="button" class="button" value="" onclick="return chksub()" />
                        </div>                            
                </div>
                <script>
                function chksub(){                    
                    if($("#title").val() == ''){
                        alert('请输入视频标题！');
                        $("#title").focus();
                        return false;
                    }                   
                    if($("#url").val() == ''){
                        alert('请输入视频链接地址！');
                        $("#url").focus();
                        return false;
                    }
                    if($("#verify").val() == ''){
                        alert('请输入验证码！');
                        $("#verify").focus();
                        return false;
                    }                    
                    postData();
                }
				//推荐
				function postData(){
					$("#postTemp").html('<div class="pop">正在发表，请稍等。。。</div>');
					$.post("__APP__/Video/add", {"verify":$("#verify").val(),"title":$("#title").val(),"url":$("#url").val(),"description":$("#description").val(),"tid":$("#tid").val()}, function(msg) {
						$("#postTemp").html(msg);
						$("#verify").val('');
						$("#title").val('');
						$("#url").val('');
						$("#description").val('');
						$("#tid").val('');
						$("#verifyImg").attr("src",function(){this.src+='?'+Math.random();});
						$(".pop").fadeOut(3000);
					});
				}
                </script>
            </div>
            <div class="rbox5_bottom"></div>            
        </div><!--视频推荐--> 
    </div>        
<include file="Public:footer" />
